﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Norm;

namespace EazyProviders.MongoDb
{

    [Serializable]
    public class MembershipApplication //: IApplicationEntity
    {
        
        public MembershipApplication()
        {
            //ApplicationId=new Guid();    
        }

        [MongoIdentifier]
        public int? ApplicationId { get; set; }
        public string ApplicationName { get; set; }
        public string LoweredApplicationName { get; set; }
        public string Description { get; set; }
    }


    [Serializable]
    public class MembershipAccount //: IUserEntity
    {

        public MembershipAccount()
        {
            //UserId = new Guid();
        }

        public int? ApplicationId { get; set; }

        [MongoIdentifier]
        public long? UserId { get; set; }

        public string UserName { get; set; }
        public string LoweredUserName { get; set; }
        public string MobileAlias { get; set; }
        public bool IsAnonymous { get; set; }
        public DateTime LastActivityDate { get; set; }

        public string MobilePin { get; set; }
        public string Email { get; set; }
        public string LoweredEmail { get; set; }


        public string Password { get; set; }
        public string EncodedPassword { get; set; }
        public int PasswordFormat { get; set; }
        public string PasswordFormatString { get; set; }
        public string PasswordSalt { get; set; }
        public string PasswordQuestion { get; set; }
        public string PasswordAnswer { get; set; }

        public bool IsApproved { get; set; }
        public bool IsLockedOut { get; set; }


        public DateTime CreateDate { get; set; }
        public DateTime ModifiedDate { get; set; }
        public DateTime LastLoginDate { get; set; }
        public DateTime LastPasswordChangedDate { get; set; }
        public DateTime LastLockoutDate { get; set; }

        public int FailedPasswordAttemptCount { get; set; }
        public DateTime FailedPasswordAttemptWindowStart { get; set; }
        public int FailedPasswordAnswerAttemptCount { get; set; }
        public DateTime FailedPasswordAnswerAttemptWindowStart { get; set; }
        public string Comment { get; set; }

        public List<MembershipRole> Roles { get; set; }

    }


}
